# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
pkgname=py3-spnego
_pkgname=pyspnego
pkgver=0.10.2
pkgrel=1
pkgdesc="SPNEGO Authentication library"
url="https://github.com/jborean93/pyspnego"
arch="noarch"
license="MIT"
depends="python3 py3-cryptography"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	python3-dev
	"
checkdepends="
	cython
	py3-krb5
	py3-pytest
	py3-pytest-cov
	py3-pytest-mock
	py3-pytest-xdist
	py3-python-gssapi
	py3-ruamel.yaml
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jborean93/pyspnego/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
4795c08f541fce3c6c52323bf9182ed7bffdd567986881ad0ff7e039b875e1f7410b6fb83817b0771d45bc5afbefca56a94136c0154553eb7aa5b0a142b71489  py3-spnego-0.10.2.tar.gz
"
